//SPDX-FileCopyrightText: Copyright 2022-2024 深圳市同心圆网络有限公司
//SPDX-License-Identifier: GPL-3.0-only

package upgrade

import (
	"context"

	"atomgit.com/openlinksaas/api-server/dao"
	"atomgit.com/openlinksaas/api-server/dao/appstore_dao"
)

type UpToVer18 struct{}

func (up *UpToVer18) Exec(ctx context.Context) error {
	err := appstore_dao.AppDao.InitAllCount(ctx)
	if err != nil {
		return err
	}
	return dao.VersionDao.Set(ctx, dao.VERSION_KEY_SCHEMA, 18)
}
